#include <jni.h>
#include <string>




extern "C" JNIEXPORT jstring JNICALL
//Java_com_david_jnitest_MainActivity_stringFromJNI(
Java_com_david_jnitest_MyStringUtils_stringFromJNI(
        JNIEnv* env,
        jobject /* this */) {
    std::string hello = "Hello from C++ new";
    hello.replace(3, 1, "o");
    return env->NewStringUTF(hello.c_str());
}

int getResult(jint a, jint b){
    return a + b;
}

extern "C" JNIEXPORT jint JNICALL
Java_com_david_jnitest_MyStringUtils_add(JNIEnv* env,
jobject /* this */){
    jint d = 3, f = 5;
    return getResult(d, f);
}